home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / pumask.nr < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. Pumask(2)                  Oct. 1, 1991                 Pumask(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Pumask - set file and directory creation mask
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        WORD Pumask( WORD mode );
  12.  
  13. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  14.        _✓P_✓u_✓m_✓a_✓s_✓k changes the file and directory creation mask of the
  15.        current process to the unsigned 16 bit quantity  specified
  16.        in  _✓m_✓o_✓d_✓e.  The old value of the creation mask is returned.
  17.        Child processes inherit the new value for the mask.
  18.  
  19.        When a new file is created with _✓F_✓c_✓r_✓e_✓a_✓t_✓e or a new directory
  20.        created  with  _✓D_✓c_✓r_✓e_✓a_✓t_✓e the initial access permissions (see
  21.        _✓F_✓c_✓h_✓m_✓o_✓d for a description of these) for the  newly  created
  22.        file or directory are normally set so that all permissions
  23.        are granted (except that execute permission  is  not  nor-
  24.        mally  granted for files). The creation mask set by _✓P_✓u_✓m_✓a_✓s_✓k
  25.        determines which permissions are  _✓n_✓o_✓t  to  be  granted  by
  26.        default.      Thus,      files     created     after     a
  27.        Pumask(S_IWOTH|S_IWGRP|S_IXOTH) call will be  readable  by
  28.        anyone, but writable only by the owner; moreover, directo-
  29.        ries created after this call would be  searchable  by  the
  30.        owner  and  members  of  the same group, but not by anyone
  31.        else.
  32.  
  33. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  34.        _✓D_✓c_✓r_✓e_✓a_✓t_✓e(2), _✓F_✓c_✓h_✓m_✓o_✓d(2), _✓F_✓c_✓r_✓e_✓a_✓t_✓e(2)
  35.  
  36. B✓BU✓UG✓GS✓S
  37.        _✓P_✓u_✓m_✓a_✓s_✓k doesn't affect explicit _✓F_✓c_✓h_✓m_✓o_✓d calls, as some might
  38.        expect.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Version 0.9          MiNT Programmer's Manual                   1
  65.  
  66.  
  67.